package com.study.springboot.tony.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * @author: chenhs
 * @date: Created in 6:42 2019/11/8
 **/
@Component
public class UserService {

    @Autowired
    JdbcTemplate jdbcTemplate;


    public Object find(String userId) {
        String sql = "select * from student where id = "+ userId;
        Map<String, Object> result = jdbcTemplate.queryForMap(sql);

        return result;
    }


}
